//
//  LEOrderCenterController.m
//  LoveExpressBusiness
//
//  Created by 刘甲奇 on 2017/5/12.
//  Copyright © 2017年 DFH. All rights reserved.
//

#import "LEOrderCenterController.h"
#import "LEAllOrderController.h"
#import "LEOrderProcessController.h"
#import "LEOrderFinishedController.h"

@interface LEOrderCenterController ()

@end

@implementation LEOrderCenterController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = self.orderMode == TodayOrder? @"今日订单":@"历史订单列表";
    
    //分割线
    UIView *lineView = [[UIView alloc] init];
    [self.menuView addSubview:lineView];
    lineView.frame = CGRectMake(0, 39, LEScreenWidth, 1);
    lineView.backgroundColor = LEBackgroundColor;
}

#pragma mark- WMPageControllerDataSource
- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController
{
    return 3;
}

- (__kindof UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index
{
    if (index == 0) {
        
        return [[LEAllOrderController alloc] init];
    }else if(index == 1){

        return [[LEOrderProcessController alloc] init];
    }
    else {

        return [[LEOrderFinishedController alloc] init];
    }
    
}

- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index
{
    
    if (index == 0) {
        return @"全部订单";
    }else if (index == 1){
        return @"进行中";
    }else{
        return @"已完成";
    }
    
}

@end
